package com.cbts.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ReceiptId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ReceiptId implements java.io.Serializable {

	// Fields

	private String applayFileId;
	private String afilename;

	// Constructors

	/** default constructor */
	public ReceiptId() {
	}

	/** full constructor */
	public ReceiptId(String applayFileId, String afilename) {
		this.applayFileId = applayFileId;
		this.afilename = afilename;
	}

	// Property accessors

	@Column(name = "applayFileId", nullable = false, length = 26)
	public String getApplayFileId() {
		return this.applayFileId;
	}

	public void setApplayFileId(String applayFileId) {
		this.applayFileId = applayFileId;
	}

	@Column(name = "aFilename", nullable = false, length = 225)
	public String getAfilename() {
		return this.afilename;
	}

	public void setAfilename(String afilename) {
		this.afilename = afilename;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ReceiptId))
			return false;
		ReceiptId castOther = (ReceiptId) other;

		return ((this.getApplayFileId() == castOther.getApplayFileId()) || (this
				.getApplayFileId() != null
				&& castOther.getApplayFileId() != null && this
				.getApplayFileId().equals(castOther.getApplayFileId())))
				&& ((this.getAfilename() == castOther.getAfilename()) || (this
						.getAfilename() != null
						&& castOther.getAfilename() != null && this
						.getAfilename().equals(castOther.getAfilename())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getApplayFileId() == null ? 0 : this.getApplayFileId()
						.hashCode());
		result = 37 * result
				+ (getAfilename() == null ? 0 : this.getAfilename().hashCode());
		return result;
	}

}